System for applying clothoid curve values to roadways in a geographic data information system

ABSTRACT

Embodiments of the invention are systems for applying clothoid curve values to roadways in a geographic data information system. One embodiment is a system, comprising: a geographic data information system, wherein the geographic data information system stores database segments in a database, wherein the database segments describe roadways; and a system for applying clothoid curve values to roadways, wherein the system for applying clothoid curve values to roadways: determines segment chains from the selected database segments; prepares the segment chains for transition to curvature space; transitions to a curvature function in the curvature space, by computing heading change at points along the segment chain, resulting in a transformation of the segment chains into clothoids; smooths the curvature function; fits the smoothed curvature function with a more generalized form which remains within a selected tolerance of the smoothed curvature function; and stores identified segments of straight lines, transition zones, and segments of constant curvature in the geographic data information system.

CLAIM OF PRIORITY

The present application claims priority to U.S. Provisional ApplicationNo. 60/992,251 entitled “SYSTEM AND METHOD FOR APPLYING CLOTHOID CURVEVALUES TO ROADWAYS IN A GEOGRAPHIC DATA INFORMATION SYSTEM,” by JamesAlan Witmer, filed Dec. 4, 2007, which application is incorporatedherein by reference.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

CROSS-REFERENCE TO RELATED APPLICATIONS

The following co-pending U.S. patent applications are assigned to theassignee of the present application, and their disclosures areincorporated herein by reference:

U.S. patent application Ser. No. ______ entitled “METHOD FOR APPLYINGCLOTHOID CURVE VALUES TO ROADWAYS IN A GEOGRAPHIC DATA INFORMATIONSYSTEM” by James Alan Witmer, filed ______ [Attorney Docket No.TELA-07806US1]; and

U.S. patent application Ser. No. ______ entitled “COMPUTER READABLESTORAGE MEDIUM STORING INSTRUCTIONS FOR APPLYING CLOTHOID CURVE VALUESTO ROADWAYS IN A GEOGRAPHIC DATA INFORMATION SYSTEM” by James AlanWitmer, filed ______ [Attorney Docket No. TELA-07806US2].

FIELD OF THE INVENTION

The present invention relates to digital map databases and systems thatuse such digital map databases, including Geographic Information Systems(GIS), Navigation Systems (embedded, PDA, wireless), Internetapplications, etc., and particularly to the representation of curvatureinformation along linear features in such systems.

BACKGROUND OF THE INVENTION

A vast majority of GIS digital maps represent straight linearfeatures—streets, water, political, land use, or recreationalboundaries—as chained line segments connected by mutual endpoints oftenreferred to as shape points. These points represent a point in 2-spaceor 3-space deemed to be along the path of the line of travel, service,or boundary. These shape points are usually inflections or bends along asingle path, such that when two line edges meet at any shape point theyare generally not collinear. The clear intention of such lines isrepresenting the real-world feature to a reasonably good approximationin a reasonably simple and compact form. Travel along the actualreal-world path or boundary can be approximately represented bytraversing each successive line segment.

The shaped line format described is a simplified model of real-worldpaths; its primary strength is its simplicity. It is easy to draw on araster screen, and it readily allows computations for length, distance,and other geometric queries. However, since actual linear features aremuch more complex and composed of non-line segment components,representation by shaped lines is plagued with representation error. Anyattempt to reduce this representation error requires an increase in thedensity of the data; no finite amount of data stored in a line segmentformat can perfectly represent a non-line segment shape.

The Clothoid is a two-dimensional shape or path, defined to haveconstant change in curvature over the travel distance. As classicallyillustrated, the clothoid looks like a clock spring, with zero curvatureat one end, and then coiling ever tighter at the other end. Arcs andline segments are simply special cases of the clothoid. A circular arcis a clothoid because it has a constant curvature—that is, zerocurvature change—wherein the curvature magnitude is inversely related tothat circle's radius. A straight line is also a clothoid, having both ano-curvature change, and a constant curvature of zero over its entirelength.

Clothoids and their special cases, circular arcs and straight lines, areused in much real-world construction. Roads in particular are oftenconstructed from pieced segments consisting of straight lines, circulararcs, and clothoids. Roadbed designers recognize that roadway curvaturedirectly relates to movement of steering wheels and axle components ofvehicles traversing the roadway. For them, limiting any abrupt changesin curvature by choosing clothoid design where feasible, represents adecision that maximizes vehicular safety and comfort, and minimizes wearon roadway components.

The concept of splines is available in mathematics. Though originallyreferring to a thin flexible rod used to draw curves, the term ismathematically understood as a function fit in which the fittingfunction has some number of continuous derivatives. Thinking furtherabout the vehicle and steering wheel example above, one can see that inorder to minimize disruptive changes in steering, a vehicular pathshould be a spline with respect to heading change over distancetraveled, with the first derivative of heading change per unitdistance—that is, curvature—being a continuous function. This type offunction will be referred to herein as the “clothoid spline.”

SUMMARY OF THE INVENTION

Embodiments of the invention are systems for applying clothoid curvevalues to roadways in a geographic data information system. Oneembodiment is a system, comprising: a geographic data informationsystem, wherein the geographic data information system stores databasesegments in a database, wherein the database segments describe roadways;and a system for applying clothoid curve values to roadways, wherein thesystem for applying clothoid curve values to roadways: determinessegment chains from the selected database segments; prepares the segmentchains for transition to curvature space; transitions to a curvaturefunction in the curvature space, by computing heading change at pointsalong the segment chain, resulting in a transformation of the segmentchains into clothoids; smooths the curvature function; fits the smoothedcurvature function with a more generalized form which remains within aselected tolerance of the smoothed curvature function; and storesidentified segments of straight lines, transition zones, and segments ofconstant curvature in the geographic data information system.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will be described in detail basedon the following figures, wherein:

FIG. 1 shows the design for the process for one embodiment;

FIG. 2 compares two clothoid representations of a curve;

FIG. 3 shows curvature and straight line interfaces;

FIG. 4 shows the geographic rationale for equation 1: the maximum chordlength for a radius of curvature yielding at most a maximum tolerance oferror;

FIG. 5 shows curvature and straight line interfaces with added shapes;

FIG. 6 shows add context for expected traversal path;

FIG. 7 shows ramp transition zones;

FIG. 8 shows curvature conversion;

FIG. 9 shows a road section for analysis;

FIG. 10 shows approximate Gaussian smoothing of curvature values;

FIG. 11 shows generating the piecewise curvature spline function;

FIG. 12 shows a calculated piecewise curvature spline function;

FIG. 13 shows a calculated piecewise spline with curve affinity applied;

FIG. 14 shows the analyzed road with radius indicator annotation;

FIG. 15 shows annotated ramp, 60-meter circle, and 60-meter detectionendpoints superimposed on aerial photograph;

FIG. 16 shows using least squares curve fit lengths to calculate a zeronet effect latitude value proposal for a section;

FIG. 17 shows an example where reshaping removed subtle relativeaccuracy jitter;

FIG. 18 shows reshaping a low quality shaped line;

FIG. 19 shows a database ramp annotated with generated curvature values;

FIG. 20 shows the design drawing of the southern portion of the databaseramp;

FIG. 21 shows the design drawing of the northern portion of the databaseramp;

FIG. 22 shows a photograph of the ramp described in FIG. 19, FIG. 20,and FIG. 21;

FIG. 23 shows sample code to generate least squares fit of a linearpiecewise function;

FIG. 24 shows the Gaussian weighted value integral for a linear functionat a point labeled as zero;

FIG. 25 shows a Gaussian approximation summation applied to a linearpiecewise function around a point;

FIG. 26 shows an illustration of Gaussian weight approximation atsample, 2.2 sigma, and 4 sigma; and

FIG. 27 shows an illustration of the likelihood of whether a linesegment is a straight line or part of a curve.

DETAILED DESCRIPTION OF THE INVENTION

Important applications such as vehicle safety systems and AdvancedDriver Assistance Systems (ADAS) require road path information that isnot explicitly derivable or available in a line-segment representation.Such systems generally have need for the instantaneous curvature of thefeature, centered at the point on that feature nearest the currentlocation of a vehicle or probe. Instantaneous curvature information canalso be used to dramatically improve the image rendering quality of themap display.

The clothoid is also a fuller, more accurate, and often more compactgeographic storage model than the shaped line representations of mostmap databases. The present invention captures curvature values and ratesof change from a pre-existing map database.

In order to meet the needs of Advanced Driver Assistance Systems (ADAS)automotive safety systems and driver comfort enhancements, along withother present and future applications, the present invention discloses amethod to determine line segments, circular arcs, and clothoidalsections that form the portions of any path of travel represented in ageographic database.

In one embodiment, the segmented data is represented as a clothoidspline, in that the parametric data defines a curve in which the entirepath is represented by clothoid segments, and in which the curvature atthe common point between any two clothoid segments will be guaranteed tobe continuous and unambiguous.

One alternative embodiment improves the shape of database segments usingthe clothoid spline that was previously generated by this invention,converted back to a shaped line. One embodiment uses the method of thisinvention to improve a geographic database or customer data that isrepresented in line segment form. One embodiment generates a clothoidspline, and subsequently converts that clothoid spline into a shapedline; and finally replaces the original database segment shapes withthose of the generated shaped line. Another embodiment generates aclothoid spline; subsequently converts that clothoid spline into ashaped line; and finally replaces or adjusts the customer datarepresentation with the shape of the generated shaped line. Onealternative embodiment improves real-time display.

Glossary and Conventions:

One embodiment of the invention describes and graphs curvature withunits of diopter (1/radius), with the convention that positive curvaturevalues induce a chosen direction of travel to bear left, and negativecurvature values cause said travel to bear to the right. This conventionis to be regarded as illustrative and not intended to limit or definethe scope of the invention to the use of such representation units ordirection.

A travel direction in the illustrations is further defined as anotational convenience.

Segment: a segment (or a road segment) is a linear element in thegeographic database, having position and other attributes, and typicallyrepresented in the shaped line geographic model. In some databasessegments may be topologically integrated with other features.

Geographic Database: the term geographic database is used herein torefer to any data storage model that consists of elements associatedwith a geographic position, including one or more of point location,linear path, and/or area. Elements of the geographic database aretypically topologically associated, by junction (endpoint meetingpoints) and perhaps other geometric qualities. Data elements may beassociated with each other, or with non-geographic entities, and maycontain non-geographic attributes such as, but not limited to, name,classification, importance, address ranges, census division.

GIS: A geographic information system, or GIS, refers to a system ofdatabase access providing spatial and/or relational access to members ofa geographic database. GIS systems are often associated with a mapdisplay, but need not be so limited: they may also comprise tabularlists, such as a list of nearby restaurants and hotels, or may beembodied as intermediate spatial data delivery systems employed withinlarger information systems.

Roadways and Junctions: One embodiment applies clothoidal curve valuesto roadways, and uses the at-grade roadway decision points (junctions)as convenient locations for dividing said roadways into manageablelengths for computation and representation. There is actually no reasonto limit such analysis to roadways; and segmenting pathways other thanthrough the use of street junctions could be construed. Theseconventions are illustrative in nature, and not intended to limit thescope of the invention.

Inherent Difficulties

Curvature represents the rate of change of the heading of a path. Shapedline data by comparison is composed of segments of constant heading,with discrete changes in heading occurring at the shape points; itsheading's first derivative is discontinuous with a value of zeropunctuated by infinite instantaneous change. This mathematicaldistinction between the two data formats results in great difficulty inderiving curvature from straight segments.

Furthermore, any line segment map database will be beset by both datacapture and precision error. Both errors are a function of the type ofcapture used: whether it is the mechanical approximation of a stream ofGPS points and the limits inherent in its coordinate system's precision,or the human/machine error of digitizing to an overlaid aerialphotograph—in which both the rendering system's spheroid error, pixeldigitization limitations, and the human's limitation in seeing andclicking the appropriate center point of a path contribute. These errorscan result in line segments that wobble or “staircase,” or have otherundesirable artifacts—artifacts that are typically magnified uponconversion to a curvature model.

The simple “three point method” of computing curvature illustrates thesedifficulties. Curvature can be approximated wherever a pair of linesegments touch (the shared point and each line segment's oppositeendpoint form 3 points, hence the technique name). This method computesthe directional change at the shared point and divides it by half thesum of the lines' length. Successive values so computed form a roughcurvature model. This conversion is unstable, being overly sensitive tothe following:

Shape point density: when more shape points are added to data of a givenaccuracy, even though the new shape points may be of the same accuracy,the curvature model acquires more and more noise. That is, the closerthe shape points, the curvature denominator (traversal distance) drops.At the same time, the numerator, angular change, becomes moresusceptible to small perturbations—for example a single unit ofplacement error will result in roughly twice as much angular error whenthe shape point density is doubled. As a GIS becomes more richly andcarefully shaped, we ironically discover its curvature noise profileincreases. The magnitude of curvature error in the three point methodcaused by a small perturbation in any shape point is unbounded as thedistance between shape points approaches zero.

Shape point density non-uniformity: the most accurate line segmentdatabase will have a shape point where a curved section begins or ends,but does not accurately portray the curvature at that point, becauseshape points are considered unnecessary in the adjacent straight linepath. Curvature algorithms that do not account for this will issuenon-zero curvature values to straight paths, and will under-representthe curvature at the boundaries of curved sections.

A final difficulty is the fact that road shape to curvature conversionfrom shaped lines to curvature yields no error measurement or bounds:one cannot “tune” the raw conversion to limit the amount of errorintroduced.

Limitations in State of the Art Technologies for Computation of RoadShape to Curvature Conversion

Three point method: as described above, this is unstable and very noisy,with no control over conversion error. Some variants of the algorithmutilize pre-generalization, or the converse: inserting intermediatecollinear shape points to longer lines. These variants may reduce someartifacts, but not robustly: a small change in shape point's positioncan affect its inclusion in generalization, yielding drastic differencesin results from basically the same data.

Hough transform: (U.S. Pat. No. 6,732,046)—The Hough transform producesgeographic smoothing, and its sensitivity can be tuned to avoidunnecessary jitter in results. Yet the Hough transform does not robustlyhandle clothoid segments or other areas of non-uniform curvature.Furthermore, the Hough transform is sensitive to the stepwise collectionbuckets used for discovering radius and angle of azimuth: too fewbuckets and the sensitivity becomes markedly non-uniform based onorientation or radius; too many and the technique becomescomputationally prohibitive. In addition, its computational burden ingeneral makes it an undesirable database analysis tool.

Psi-s modeling: (U.S. Pat. No. 7,152,022)—The conversion from coordinatespace to psi-s allows for smoothing; unlike Hough it is not sensitive toarbitrary bucket design decisions; it can be used to find clothoids; andit is computationally simpler. Yet this technique suffers fromdiscontinuities in the computed curvature values at the interfacesbetween adjacent curve fit segments—thus it is not a well formedclothoid spline (see FIG. 1—the left-hand curve 104 illustrates thistype of deficiency). It allows no ready means to limit or measure therepresentation error introduced by the conversion from shaped lines tocurvature. Further, finding clothoids in the segmented results requiresthe code to match parabolic functions—a level of complexity not requiredin the approach of the present invention.

Use of Bowing Coefficient: (U.S. Pat. No. 6,681,177)—This techniqueavoids the complexity of parametric curves altogether by reverting to asimple distance-of-travel versus chord distance measure. The method iscomputationally simple and can be relatively insensitive to jitter inthe coordinate data. However, it suffers from “over-generalization”—datais collected at specific points and for specific distances (the bowlength). In its lowest bowing length extreme, it is merely an analogy ofthe three-point method. With higher lengths, it becomes a generalizeddepiction of a certain length of road. This means that sharp curves,relatively quick changes in curves, and the beginning or ends of curves,are improperly characterized. Furthermore, this technique produces densedata with no facile technique to reduce the data by detecting clothoidsections, nor does the method provide means to limit or measure theinduced representational error introduced by the conversion from shapedlines to curvature.

Standard Splines and Polynomial Equation Fit: Polynomial equationtechniques such as the cubic spline are available in the prior art;these equations can be fit to geographic paths with remarkablepositional fidelity and few control points. However, such polynomialequations can generate artificially large curvature values, making themgenerally unsuitable for vehicle navigation and safety systems.

Dual Road Geometry for Representing Position and Curvature-Heading:(U.S. Patent Publication No. US2007/0288158 A1)—The technique of usingdual geometry representation attempts to solve a different problem: thefact that shaped lines often conform to connectivity restraints andother prohibitions that prevent them from representing the actualvehicular path in a given roadway. That technique can be useful when theactual path of vehicles is known, or when multiple paths are availablefor a given roadway segment. Different travel paths and uses mightinvoke different conversion methods or parameters. In such cases bothgeometric and curvature representations can be generated from multiplepaths. However, that technique doesn't teach a particular method ofproducing curves (though it refers to the standard methods for producingsplines and clothoids, already outlined above). Thus, the technique islimited in the same ways as described above. In addition, the dual roadgeometry representation technique is limited to cases where multiplerepresentations are available or can be externally derived. In contrast,the present invention includes a method of determining curvature withoutproducing irregularities, by using the roadway's context and knowntransition rules, and requires only a single shape representation.

Differentiating Aspects of the Teleatlas Clothoid Algorithm

By contrast, the present system alleviates the problems described aboveand produces a bounded error model in the curvature domain.

Shape Point Density

The algorithm of the present invention is robust at any level of shapepoint density. It uses minimal or no generalization in the spatialdomain. Instead, the predominant smoothing occurs after conversion intocurvature/distance space. The difference is profound, since jitter inthe input data tends to confound generalization—jittery points cansurvive generalization whereas important nearly-collinear intentionalshapes can be lost—yet jitter is easily smoothed by a Gaussian filterover the resulting curve. A doubling of shape points, which will roughlyquadruple error noise in the simplistic three-point curvature algorithm,will merely mean twice as many data points under each Gaussian filter.The algorithm of the present invention is a robust conversion thatactually increases in fidelity with increasing shape density.

Shape Density Non-Uniformity

The technique of the present invention deals with the interface betweenlonger straight lines and the shorter lines involved in a curve byinserting additional shape points as needed, based on a calculation oferror using the relative accuracy confidence. Doing so produces curveswith the appropriate blend of fidelity to the original line work, whileavoiding the unnecessary discontinuity in the curve parameters that canresult from line densification, an adaptation often attempted inalternative techniques.

Simplicity

Shapes converted to curvature/distance space are amenable to simplefirst-order regression analysis. In one embodiment, a parametricclothoid spline is generated by solving in curvature/distance space aseries of simple, piecewise (first order) least-squares analysis, inwhich the error is bounded inside each. Furthermore, the technique isparticularly facile for identifying abrupt changes in the curvature,yielding ready points for segmenting the linear approximations. Thesimplicity of the technique yields a very small, comprehendible, andefficient computer algorithm.

Error Limitation/Control

The error induced in representation is balanced against the likelyjitter of the source. Start with optional generalization and theGaussian filter in the curvature/distance domain to remove jitter. Theamount of such smoothing is based on the known or determined relativeaccuracy of the path; it induces a small localized error well within thepath's accuracy limit. The spline fit of first-order least-squaressegments can be parameterized to limit the total curve error and overallRoot Mean Square Error (RMSE) to whatever practical values are required.

Clothoid Spline Representation

The technique of the present invention generates a clothoid spline. FIG.2 illustrates the differences between a noncontiguous curverepresentation and a spline. In the figure, a geometric curve 200, shownwith arbitrary direction of travel 202 for clarity, is represented byboth a noncontiguous curvature function 204 and a spline curvaturefunction 206. Dashed vertical lines 208 illustrate the discontinuitiesin the noncontiguous curvature function 204. Said discontinuities 208are undesirable for applications in which a curvature value relates to awarning level, an aiming device position, a maximum safe speed, or otherphysical state, because the discontinuity requires an instantaneous andabrupt change to said state.

1. Overview

One embodiment is constructed as a process illustrated below in FIG. 1:

Segment Selection: The method of the invention selects segments from adatabase 100, using a segment selector algorithm 102, to produce acollection of segments 104. The segment selector can use any of priorart techniques, notably relational query or geographic selection, orsome combination of the two, though it needn't be so constrained.Multiple queries might be employed in order to garner a contiguousnetwork of segments within a region for a certain mode of travel, or tomeet specific application needs. Numerous selection means exist in priorart.

Segment Chaining: A segment chaining algorithm, 106, organizes thecollection of segments 104 into chains 108, of meaningful length (suchas streets from one junction to the next junction). The only requirementon such chains is that they represent an unambiguous path withoutinternal branches or discontinuities; the paths themselves may cross asneeded.

Perform a Process on each chain, as illustrated in box 110, which willmathematically decode the chain into a clothoid spline, as follows:

Find Corner Interfaces: at adjacent shape edges where the osculatingcircle deviates by more than a known relative accuracy from the shapedline.

Place Chain in Geographic Context/Transition Analysis: Find prior andnext “expected” travel segments (based on type, classification, Form ofWay (FOW)). Extend the geometry into those zones; interpret length oftransition zone (if any) using FOW/classifications. Remove shapes withintransition zone.

Convert to Curvature-Distance System: Represent chain inDistance/Curvature coordinate system. Clip geometry back to validregion.

Gaussian Smooth: Apply Gaussian smooth filter in Curvature space.

Basic Curve-Fit: Apply a successive or recursive curve fit technique(for example, least-squares linear fit, bifurcating at furthest datapoint from the trend line until the error criteria is met).

Flat and Zero Affinity: iteratively attempt flat-line and zero-pointreplacements.

Result: Following this process, the resulting clothoid spline isavailable for a wide variety of uses; its parametric values may beappended to the original database, depicted as 112 in FIG. 1. Thedatabase, 112, may be updated with improved shapes as described herein.Alternately or additionally, one or more files, 114, may be written toassociate the clothoid spline with the geometry. Such files may in turnbe used for further processing, for deferred updates to the database,for delivery to consumers, or as direct input to devices such as ADASunits.

2. Segment Selection

Select segment types of interest within area of interest, or using othercriteria of interest. In one embodiment, a segment selector is acomponent that selects the segments of interest. Alternative embodimentsare contemplated to select the database segments that will be analyzedfor clothoid representation. A query based on a segment's type (e.g.:street versus land use feature), or location (e.g.: within an area ofinterest), or topology (e.g.: connected to other segments deemedinteresting), or any combination of these and other criteria might beused to form the selection.

3. Segment Chaining

This portion of the process produces chains of meaningful extents: e.g.,each chain a “no-decision” junction-to-junction path. Chains representthe selected streets, with junctions providing topological relationshipsbetween adjoining chains. In one embodiment, segments are chained basedon expected vehicular travel. In particular, any street junction thatrepresents a possible decision to exit or enter traffic on the street isan important location used to distinguish one travel chain from others.A dead end within the selected network of segments is also an importantlocation at which traffic flow or the area of interest ends. Traversethe plurality of important locations, finding each geographic chain ofsegments that traverses from a given important location, and touching noother important location, until it reaches the same or another importantlocation. Chaining provides the opportunity to perform an analysis overa meaningful distance from the customer standpoint.

4. Find Corner Interfaces

For each chain, it is important to detect interfaces between straightline sections and either curves or other straight line segments.Examples are shown below. This detection is needed because shaped linesegments assume that the travel path is approximately linear betweenshape points, a fundamental difference from a curve-basedrepresentation. Without such interface detection, any resulting curvewill erroneously indicate curve on straight sections, andunder-represent curvature at the interface area. A very light shapepoint generalization may be advised prior to interface detection, inorder to remove unintended collinear shape points caused by topologicalintersections with non-selected features.

FIG. 3 illustrates curves that contain straight line interfaces. In thegeometric line L300, containing shape points 302, 303, 304, 305, 306,307, the line segments within central points 303, 304, 305, 306 comprisea turn, while the line segments between 302,303 and between 306,307 areintended to represent straight line travel. An interface betweenstraight line and curve section is implied as shown by arrows 310,312.In the geometric line L320, containing shape points 322, 323, 324, thetwo straight line segments between 322,323 and 323,324 meet with anabrupt heading change at the single point 323. That change at point 323implies a quick curve, bounded by two inferred straight line-to-straightline interfaces illustrated by arrows 330,332.

The present system utilizes the relative accuracy of the data todetermine whether any given shape point trio is likely a constant curve,or an interface. Relative accuracy is a measurement of how far thedata's successive internal shapes might vary with respect to each otherirrespective of heading changes in reality. In captured data, relativeaccuracy is limited by cumulative process inaccuracies such as humanperception limits, pixel (pointing device) quantization, image accuracy,image registration or orthorectification errors, probe vehicle devicejitter, geometric generalization, etc. A relative accuracy claim mightbe supplied with source material, or can be inferred to be a proportionof the more common absolute accuracy claim. That is, anecdotal evidencein geographic data suggests that relative accuracy is often wellrepresented as 25% the distance of the data supplier's absolute accuracyclaims, though this proportion may vary in other domains. In cases whereno source material claims are found, relative accuracy can be inferredby observation such as manual sampling of point quality with respect toavailable imagery, or other similar means.

The present invention processes successive trios of shape points in eachchain. Referring to FIG. 3, shape points 302, 303, and 304 are anexample of a single shape trio on chain L300. For each such trio ofsuccessive shape points in the chain, the process derives the radius ofthe theoretical osculating circle based on those three points, anddetermines the maximum chord length for which that circular radius wouldremain within the relative accuracy tolerance. Such maximum length iscalculable from Pythagorean geometry as shown in FIG. 4 (Equation 1). Ifone or both attached line segments are longer than this limit, then asimple curving interpretation of the area between shape points isinsufficient to meet the accuracy claims, and this is construed to be aninterface between straight line and curve. In that case the inventionproceeds to insert additional shape points in order to ensure that laterstages interpret the chain correctly as an interface.

FIG. 4 illustrates the geometric means for calculating the maximumallowable chord length when the radius of curvature and the expectederror tolerance are known. Given an arc 400 of radius r as shown withcircle midpoint 402: one can see that a straight line chord 404 betweenits endpoints, having length l, bisects a radial path 406 between thearc 400 and midpoint 402 such that a portion 408 of radial 406 restsbetween the arc 400 and chord 404. The length of line 408 represents themaximum error distance between the arc 400 and chord 404. The length ofthe radial portion 408 is assigned a value of t—our maximum errortolerance—such that other portion 410 of the radial 406 has a length oft−r. Using the Pythagorean Theorem on right triangle T420 formed by theradial 406, radial 414, and the half-chord 412, we can arrive at themaximum length of 412. Solving and doubling that length to get thelength of chord 404, gives the maximum chord length that can beencountered if a straight line shape is truly intending to model a pathof radius r within error tolerance t.

In actual practice, deciding whether a line segment should be a straightline or part of a curve is not entirely certain. It is a likelihood,rather than a yes/no decision, and is more like the curve shown in FIG.27. A line segment is virtually certain to be a straight line when theedge length exceeds the calculated maximum chord length, as describedabove. And when the line segment is substantially shorter than thatcalculated length, it is either part of a curve, or is so short as to beindiscernible from a curve at the given digitization accuracy—and thusmay be safely considered a curve segment. However, line segment lengthsthat are uncertain, as indicated by shaded area 2700, will occur. It ispossible to ignore such cases, and assign a yes/no breakpoint at somelocation within the shaded section.

A better way, as employed in this invention, is to use a sliding scaleof maximum chord length, using additional local information known toaffect the digitization. For example, we know that a line segmentintended to indicate a straight line will usually be much longer thanits curved representation neighbors. So the lengths of the two linesegments involved in the chord calculation are compared: if the lengthratio of the longer versus smaller adjoining line segments isexceedingly high, then it is more likely the beginning of a curve andthe length tolerance is commensurately reduced within the shaded area2700. Specifically, we consider r, the ratio of longer to shortersegment lengths, and constrain it to within the range of 2 to 8. Ourinterface detection tolerance is: maximum_chord_length/log₂(r), whichgives us a sliding scale between ⅓ to 1 times the originally calculatedmaximum chord length.

Also, roads are more often constructed with straight ends when theyapproach 90-degree T junctions. Thus the final line segment of a chainthat ends at a near-90-degree T junction is more aggressively detectedby halving the chord length tolerance as calculated above. These andother similar adjustments may be applied based on real-world domainknowledge or knowledge of the data supplier's error factors.

When an interface is indicated by the calculation, an additionalcollinear shape point is inserted so that later curvature calculationwill distinguish the straight section as being actually straight. Theinsertion proceeds as follows:

If only one attached edge triggers the maximum chord length, insert acollinear shape point on that edge near the center point, such that anew line segment of the same length as the shorter edge has beencreated.

If both edges trigger the maximum chord length, create a collinear shapepoint along each edge near the center point, at a distance of d=rθ wherer is a certain standard minimum radius for the path type, and θ is thecurrent angle between the line segments. For example, one embodimentuses a 4-meter minimum radius for surface roads and parking lots.

FIG. 5 illustrates this process for the shapes previously considered inFIG. 3. New shape point 510 is added to L500 between shapes 502 and 503,and new shape point 512 is added to line L500 between shapes 506 and507. Similarly, shape point 530 is added to L520 between shapes 522 and523, and shape point 532 is added between shapes 523 and 524. All suchshape points are collinear with the original lines, such that theydemarcate a section in which curvature is zero.

In an alternative embodiment, mild generalization may be employed atthis point, for the primary purpose of reducing computational effortlater. Generalization should be limited to a tolerance of up to ½ theknown relative accuracy. Such generalization must not remove any pointinserted by the straight line interface detection process (points 510,512, 530, and 532 in FIG. 5), nor any single shape point that has beenidentified as a straight line/straight line interface, such as point 523in FIG. 5.

5. Place Chain in Geographic Context/Transition Analysis

When there is a known expected travel path from the given chain to otherchains, a portion of their geography may be added to the chain's shapeas context (FIG. 6). This ensures that the ends of the chain can begiven curvature values that represent a broader view of the expectedtraversal path. The length of context should be at a minimum severaltimes the Gaussian smoothing sigma value as described later, providedthat length of context can be identified. For example, with roads inwhich the Gaussian smoothing sigma ranges from three to 15 meters, thepresent system retrieves up to 50 meters of context.

FIG. 6 illustrates two such cases: in example 600, currently consideredchain 610 connects at-grade with chains 612, 614, 616, 618, and 620.Only chain 618 is deemed an acceptable continuation chain; neither of612 nor 614 is of the correct angle to be continued in the otherdirection. In that case, the context for chain 610, represented bydotted line C622, consists of the geometry of 610 and a portion of chain618 that connects with 610. In the case of the cul-de-sac 640 in example630, chain 642 is an acceptable match for both ends of the cul-de-sac'scircular chain. The full context, indicated by dotted line C644, of thechain will consist of the cul-de-sac geometry, enclosed on both ends bya portion of chain 642 geometry.

It is possible that the geographic database has been modeled using rulesthat prohibit it from accurately representing a path in somecircumstances. For example, street centerline merge points—at the endsof ramps or surrounding traffic islands—are often subject to geometricrules designed to provide acceptable route guidance instructions. Insuch cases it is important to determine whether the data represents truetravel, or simply an idealized representation, and to yield appropriateresults in either case. In an embodiment that works with ramps, forexample, it may be necessary to smooth or replace shapes in the vicinityof a road junction to more properly approximate the true travel path.

As a particular example, as shown in FIG. 7, it may be known that thegeographic database requires all ramp ends at major interstates toterminate with a particular minimum approach angle, and that the effectsof such constraint affect the ramp's representation over a distance ofno more than 20 meters. It may be further known that the common mergedistance beyond that point is 40 meters. In such cases the said 60-metersection can be replaced by a straight line. In other instances theinvention could be used with known specific transition zones or othermeans for determining transition regions.

FIG. 7 illustrates a ramp, 700, as the current chain. A highway ofchains 702, 704 intersects the ramp, and it is determined by generalazimuth that chain 704 is the correct context chain. The full context,illustrated by dotted line C706, removes shapes within the final 20meters of ramp 700 and the first 40 meters of highway chain 704.

At this point in the process a conditioned shape line representsexpected traversal within the chain and the expected traversal betweenthe chain and other nearby chains; the conditioned shape line alsoincludes collinear terminal shape points to indicate the beginning andend of transitions between linear sections and curved sections. Thisline has been purposefully conditioned so that a simplistic three-pointcurvature generation technique will yield robust functional results thatcan be further improved within curvature space by the remainingprocesses of the invention.

6. Convert to Curvature-Distance System

One embodiment of this invention converts the conditioned shape line tocurvature space. Curvature or diopter (in units of1/distance-unit-radius) may be considered the y axis, and lineartraversal distance along the path is the x axis. It is convenient toassign a single travel direction, and to consider one endpoint of thechain to be at location 0, with the remainder of the chain traversalaccruing in the positive direction. Since some shape context might bepresent beyond the starting endpoint of the chain, it is deemed to be ata negative offset in the distance axis. Similarly, context beyond thefinal endpoint of the chain will be deemed to have an offset higher thanthe chain's traversal length. The curvature values within context zones(below zero offset; above chain-length offset) are not directly used,but are present rather to ensure the fidelity of shape point trioconversion at the edges of the chain's length boundaries.

In this embodiment the curvature function's form is further restrictedto that of a piecewise linear function. Since the definition of clothoidis a continuous change in curvature over traversal distance, then thisstep represents a conversion of the shaped line directly to a clothoidrepresentation. Furthermore, the piecewise linear function iscontinuous, thus it is a form of clothoid spline.

In general, shape point trios are converted to curvature space bycalculating curvature as the radial angle change divided by half the sumof attached line segment lengths. The only exception is the first andlast shape trio, in which the end line segment's entire length insteadof half that length is incorporated in the denominator. Each value socalculated may be plotted as the y value at an x value indicating thetravel distance along the path (which may be negative for pre-startcontext points). The first and last values are also duplicated at theextreme distance positions. These measured values are connected withstraight lines, as shown in FIG. 8. For ease of display, FIG. 8 shows ashaped line where the shapes begin at distance 0, with no negativecontext.

In FIG. 8, point 802 is calculated first, using the direction change inradians (−0.12) divided by the full length of the first line segmentbetween points 800, 802 plus half the length of the next segment betweenpoints 802, 804. That denominator is (25+½*10=30). This value of −0.04diopter is placed at 25 on the x axis, illustrated by point 822. Sinceit is the first line segment of the figure, the value is also duplicatedat the low length extreme (zero distance), shown as point 820 in thegraph. Point 804 has direction change of −0.4 radians; divide by halfeach attached line's length (½*10+½*4=7). Its value of −0.057 is placedat 35 on the x axis, illustrated by graph point 824. Calculationscontinue in this way until the entire path is converted.

7. Apply Gaussian Smoothing

In an embodiment of this invention, Gaussian smoothing in thecurvature/distance domain replaces the historic reliance on geographicgeneralization in order to reduce relative-accuracy-induced noise.Gaussian smoothing in the curvature domain produces a more robustcurvature graph.

The Gaussian smoothing width (or its sigma(σ) value) can be chosenanecdotally; it is roughly the distance over which curvature changeshould be detectable. It should be a high enough distance so thatunintended noise from relative inaccuracy is mitigated. As a rule, theGaussian sigma should be at least 3-4 times the relative accuracy value.The Gaussian smoothed values will be used for curve fitting. Gaussiansmoothing σ may be selected solely on the basis of relative accuracy, orit may be additionally modified based on road use type (such as rampversus highway), expected vehicle types, or other measures that couldindicate the likelihood and frequency of curvature change in the realfeature. Note that relative accuracy or other measures used to determinethe Gaussian σ may vary, thus in the means described in this invention,the Gaussian smoothing width need not be constant for all segments underconsideration, or even within a given segment. Appendix 2 furtherdescribes a σ width-insensitive method that can be used to simplify thecomputation for Gaussian smoothing.

In one embodiment, the Gaussian curve is simplified—the Gaussian valuesare approximated by sampling at various sigma intervals near eachcaptured shape point position, such as ±4σ, ±2σ, and shape pointposition itself—and connecting these with straight lines. Wherever anytwo shape points are within 4σ of each other, those samples and themidpoint between them are calculated. FIG. 9 highlights a ramp 900 to beanalyzed, with traversal indicators 902 to guide the reader tointerpreting the graph of FIG. 10 as it relates to traversal of ramp900. FIG. 10 shows the jagged raw curvature data 1000, and its smoothedapproximation 1002. The extremes of the shaping artifacts are quitesmoothed, while the characteristic curve remains clear.

Other embodiments to this invention may involve smoothing the curvaturefunction by means other than Gaussian weight. In particular, a smoothingfunction popular for its simplicity is the triangle filter, so-calledbecause its sensitivity graph around a point x with aperture d can bevisualized as a triangle with a value of zero at x−d and x+d, peaking ata value of 1/d at x. In other words, its value at a point x is(∫f(x₁)*(d−|x−x₁|))/d², integrated from x₁=x−d to x+d. Another simplesmoothing function is the square filter, in which the sensitivity is aconstant 1/2d x−d and x+d, thus having a value at point x of ∫f(x₁)/2d,integrated from x₁=x−d to x+d. These filters and many others can beapplied as part of this invention, and may further benefit from thecomputation-saving concepts described in Appendix A2.

8. Curve Fit

The clothoid spline in curvature space is now smooth and amenable tosimple regression analysis for curve fitting. This can be done byrecursively applying a regression technique such as first-order (linear)least-squares fit. Working in curve space provides a way to quantify andlimit the amount of error that is generated in the fitting process.

One embodiment recursively applies first-order (linear) least-squaresfit to the Gaussian smoothed curve, to generate a piecewise linearfunction as follows. A listing in c++ is included, providing an easymeans to generate a correct first order least squares line for anypiecewise linear curve such as the curve being processed.

The recursive routine returns a piecewise linear function. The functionwill operate over the whole of the length of the curve, or over somesubset (termed “the subset”).

The method first tries a single-piece least-squares linear fit function(f′), which can be calculated using the computer code of FIG. 23, tomatch the smoothed curve function (f) within the subset. Acceptance isdetermined by measuring the standard deviation, weighted by the length(d) of the subset, a formula of:

E=d*√∫(f′−f)^(2.)   Equation 2—Length-weighted Standard Error

If E is greater than a preset maximum, the calculated linear function isinsufficient to meet the error criterion, and the system recurses asshown below. If E is acceptable, then the calculated function isreturned.

The system recurses by finding a pivot point at which the subset can bebifurcated. In one embodiment, the point in the subset at which thesmoothed curve function varies most from a straight line drawn betweenthe subset's endpoint values is chosen for a pivot. This so-called pivotpoint becomes the end point for a new “first” subset, and the startpoint for a new “second” subset. The system recursively retrieves thebest piecewise linear functions for these subsets.

One final resolution is necessary before joining the two piecewisefunctions (for example, f1 and f2) at the pivot point: f1(pivot) andf2(pivot) undoubtedly return different values. The two piecewisefunctions must be modified to make a proper spline. The pivot-pointvalue for the merged function will be assigned a common value based onthe distance-weighted mean value of the two pieces of each which touchthe pivot point. That is, the value at the pivot point is assigned to:

V _((pivot))=(d1*f1(pivot)+d2*f2(pivot))/(d1+d2)   Equation 3—Value ForCommon Endpoints of Piecewise Linear Function

in which d1 and d2 are the lengths, respectively, of the linear portionof each function that touches the pivot. This distance-weightedcalculation for the pivot point has the notable characteristic ofmaintaining the same area in the fit function as that of the piecewiselinear function undergoing fit. Since summed function area in curvaturespace is directly proportional to geographic heading change, thischaracteristic accumulates no overall heading error and thus minimizeserror in general, as will be discussed further.

With the pivot point value resolved, the two equations can be joined.FIG. 11 shows a simple example operating along 90 units of distance. Forthe purpose of clarity, each piece of each intermediate generatedfunction has been labeled with a unique identifier; in actual practice,any method or software algorithm that models piecewise functions may beused, and the pieces themselves need not be distinct, other than for thepurposes of determining length.

The numbered exhibits of FIG. 11 illustrate successive steps in usingthis recursive approach in discovering a good function fit. Exhibit 1100illustrates a sample curvature against traversal graph of some geometricshape. In Exhibit 1102 the first step of the invention attempts togenerate a single least-squares match for the function, illustrated asthe dotted overlay f1. The error value of this function, compared to theoriginal, fails to meet the set threshold. The process must calculate apivot point, illustrated by the encircled pivot point in Exhibit 1102,which is the furthest point in the original function from an imaginarystraight line connecting its endpoints. Exhibit 1104 illustrates thenext step—the attempt to generate a fit to the function between theorigin, to the pivot found in 1102, with function f2. This function fitalso fails to meet the error threshold, resulting in the need to againfind a pivot point, this time the point on the visible portion of theoriginal function which is furthest from an imaginary straight lineconnecting its visible portion endpoints. Exhibit 1106 illustrates thenext descent into function fitting, but at this stage the function fitf3 meets acceptable error and is retained for later stages. SimilarlyExhibit 1108's function fit f4 meets acceptance standards. Mergingoccurs, as shown in Exhibit 1110, to reconcile these two function valuesat the pivot point they share, the pivot that had been calculated in1104. Exhibits 1112, 1114, and 1116 are similar to 1104, 1106, and 1108in first attempting a function fit (f7) which fails to meet errorcriteria, and then succeeding with function fits in subsectionsdelimited by the pivot point found in 1112. Exhibit 1118 reconciles thevalues of functions f8 and f9 at the pivot that had been found in 1112.The final step of Exhibit 1120 reconciles the values of the derivedpiecewise functions of 1110 and 1118, at the pivot point that had beenfound in 1102. The result is the four-piece linear function fit shown in1120 as an overlaid dotted line.

FIG. 12 is an actual resolved linear function for the road in FIG. 8.Function plot 1200 is the smoothed Gaussian approximation of thecurvature—the same function as illustrated in 1002 of FIG. 10. Functionplot 1202 is the result of the preceding recursive function fit processapplied to that Gaussian approximation.

9. Apply Straight Line and Curve Affinity

One embodiment of this invention as described above facilitatesremarkably accurate discovery of straight line and arc sections of apath. Thus one can determine which portions of a geometric curve may berepresented by straight lines (curvature zero), or by arc segments(constant curvature), rather than by the actual least-squares regressionresults. Such determination may be advantageous if, as in the case ofmany roadways in most countries, the real-world features themselves aredesigned to use such shapes wherever possible. Said determination may beused as information within client systems to improve line-of-sightcalculations, optimize steering tracks of automated vehicles, or simplyas a means to lower the computational overhead of interpolatingcurvature for other purposes. Said determination may be delivered as aseparate product, or may be used to generate new parametric values thatwill replace the initially calculated values altogether.

In the discussion below, it is convenient to describe one embodiment asreplacing the initially calculated values. It can be seen that otherscenarios, for example delivering one or more alternative functionsusing varying levels of straight line and curve affinity in addition tothe basic curve fit, are possible. Therefore the replacement terminologyis illustrative and not intended to limit the scope of the invention.

One embodiment searches for opportunities to replace endpoint values inthe piecewise function, subjecting each proposed change to two errorformulas: the distance weighted error value (E) from Equation 2, and anabsolute value of accumulated error, or:

E _((a))=|∫(f′−f)∂d|  Equation 4—Formula for Absolute Value ofAccumulated Error (E _((a)))

The latter value, E_((a)), is quite important because absolute error isdirectly proportional to the angular error that may be introduced by theparameter replacement being considered.

Each function value replacement proposed in the techniques below,whether it is a single point replacement, or the replacement of acontiguous section of the function, must undergo this error test. Thefunction section prior to the replaced value(s) must continue to meetthe criteria; the function section immediately following the replacedvalue(s) must continue to meet the criteria; and in the case where acontiguous section is replaced, that new section must meet the criteria.When all these criteria are met, the replacement is deemed of sufficientquality to be taken.

One embodiment iterates along each section of the already calculatedpiecewise function, trying to fit it and as many successive sections aspossible into a single constant valued function. For each section i,calculate the mean value of the original function, that is,

V _((m))=(∫f(x)dx)/d   Equation 5—Mean Value over Distance (V _((m))) ofFunction f

in which d is the total distance covered. Attempt to replace bothendpoints of section i with V_((m)), applying the error criteria to thissection, the preceding section (i−1), and to the successive section(i+1). If all affected sections are within the maximum tolerance, thisreplacement is acceptable. Attempt to aggregate adjacent functionalsections by repeating this process with a combined section consisting ofthis section and the succeeding section (i+1). Continue addingsuccessive sections until the proposed replacement fails. The mostrecent viable replacement for a contiguous group of sections isconsidered a successful constant-value function replacement.

When a successful constant-value function replacement is identified,also check the error criteria for a replacement function with a constantvalue of zero instead of V_((m)) for the new function section. If a zerovalue meets the tolerance for all affected sections, use the zero valueas the new function section endpoints; otherwise they should be set toV_((m)). After performing this successful constant-value functionreplacement, advance the iteration to the next unchecked functionsection.

In a further refinement of this method, a successful section replacementis followed by successive attempts to push its endpoints yet further.Iteratively attempt to advance the beginning point or the ending pointof the flat line section respectively to the location of the previous ornext sample point. If the successful constant replacement value has notbeen forced to be zero (representing a straight geographic line), itshould be permitted to “float” to the V_((m)) of the newly proposedexpanded section. Calculate the error criteria for all affectedsections; if they succeed, the advancement is considered viable.Continue until neither the beginning point nor the ending point of theflat line section can be expanded to a viable flat line, and accept thelast successful advancement endpoints and the calculated constant valuefor that section.

The affinity logic is also applied to successive points between thelinear function sections, and to the beginning point and endpoint of thefunctional fit. In a manner similar to the one used for replacingsections, any individual point may be replaced by zero if the twofunctional sections affected, the section before that point and thesection after that point, remain within the error criteria followingsuch a replacement.

FIG. 13 again shows the original smoothed Gaussian approximation to theroad 900 in FIG. 9, as plot 1300; and it shows the linear splinegenerated from it using the function fit process, as plot 1302. Plot1304 shows the affinity model applied to 1302. The first point offunction 1302 has been successfully modified to zero, shown at point1306, and two adjacent sections of 1302, labeled 1308 and 1310, havebeen successfully replaced with a single constant curve section labeled1312.

FIGS. 14 and 15 show the road that was used for this illustration, inisolation from other features. For illustrative purposes, the road hasbeen annotated with the radius of curvature (which is the inverse ofdiopter) to indicate the high fidelity of the results. The straight line1312 from FIG. 13 directly relates to the region of detected constantcurve with radius of 60 meters denoted by the end annotations marked1400 in FIG. 14, and consisting of those points and the roadway betweenthem. Zero is used to indicate no curvature (undefined radius). The zeromarking, 1402, relates to the zero affinity point 1306 in FIG. 13, andis a reasonable representation of the ramp's flattening to a straightroadway at that point.

FIG. 15 shows this road using aerial photography, with a thin circle of60-meter radius drawn coincident with the 60-meter circular arcendpoints (1500) detected by this invention. The image demonstrates thehighly accurate discovery of both the radius and the extent of acircular subsection within the road's centerline path, matching theimagery well despite the intrinsic error of the original line segmentdatabase.

10. Setting Error Tolerances in Conversion

Operation in curvature/distance space, and the simplifyingrepresentation of the Gaussian smoothed curvature profile as piecewiselinear functions, provide for control of the conversion error introducedduring the process.

In so doing, one embodiment provides a robust conversion that eliminatesthe noise inherent in the relative inaccuracy of the original linesegment data, while maintaining the fidelity to the real-world shapes itintends to represent. Said another way, this embodiment provides anenvironment in which shape fluctuations within the relative accuracyrange of the source data will have a zero or negligible impact on theresults, yet an optimal recognition of differentiating shape isobtained. The Gaussian smoothing sigma should be three to four times therelative accuracy; in addition, the error tolerances for functionfitting and affinity models can be appropriately derived.

The overall heading error can be set to zero, and the upper bound inpositional error will be shown.

One embodiment limits heading error between curvature-basedrepresentation and shaped line representation. Heading error is definedas the instantaneous heading difference between a curve based on theclothoid parameters, compared to some plausible curve generated from theshaped line itself. In one embodiment, the overall heading errorgenerated by a least squares curve fit of any standard deviation E overdistance d is zero because any least squares curve will pass through(x_(mean), y_(mean))—thus the sum of curvature will be equal betweenleast squares fit and the original function. Similarly, the use ofEquation 3 to force common endpoints between the piecewise least squaresresult sections also holds overall orientation error to zero. Thereforethe only overall error in heading is produced by the affinity models.These errors are bounded solely by the choice of E and E_((a)).

Alternative Embodiment: Straight Line Affinity with Zero AccumulatedHeading Error

In fact, the overall orientation error within the affinity model can beheld to zero by adjusting Equation 5's mean calculation with acalculation that instead maintains the area under or over the curvaturefunction. Since the sum of area under or over the curvature function isdirectly related to heading change, no change in area means a netheading error of zero. With values as indicated in FIG. 15, simpleequation solving can show that a replacement of v1 and v2 with:

v=(a*v1+2b*mean+c*v2)/(a+2b+c)   Equation 6: ZeroError Flat LineSubstitution

will have the same overall curvature as the original approximatingfunction. In this alternative, the accumulated error, E_((a)) need notbe determined; it is precisely zero.

FIG. 16 illustrates a specific example: in this case a fitted function1600 is analyzed, with a function section consisting of two adjoiningpieces, 1602, to be considered for straight-line replacement, and havinglength b in the equation above with endpoint values of v1 and v2.Section 1602 is surrounded by function pieces before and after, with xaxis extents marked as 1604 with length a and 1606 with length c,respectively. A mean value 1608 for section 1602 of function 1600 hasbeen calculated. The calculation of equation 6 yields the value v asshown, leading to the proposed replacement function 1610 and having nonet area change compared to function 1600.

Note that the use of zero affinity is not readily provided in thisalternative; only flat-line affinity, related to the detection of circlesegments, is available. Nonetheless, flat lines that had been detectedin the find corner interfaces will remain flat.

Finally, with overall accumulated heading error at zero, the only sourcefor positional error is the cumulative effect of instantaneous headingvariance. This effect is proportional to the value of E permitted inbuilding the least squares fit, times distance; however, since distancewas used as a denominator in the error criteria, distance error can bebound to a constant within each section of the curve.

11. Reshaping or Enhancing Database Geometry

One embodiment has a simple clothoid-to-shape line reverse conversion tosmooth and beautify existing shaped line chains. Reverse conversions,available in prior art, can be used to provide the optimal minimumnumber of shapes to adhere to a desired distance tolerance of theclothoid characterization. That is, in cases where shaped line data isthe desired mode of delivery, the clothoid curve characterization asshown above can be used, with a reverse conversion, to repositioninternal shapes on lines and deliver the results with a minimal numberof shape points as needed for the desired application's precision.

Given that some level of conversion error is inevitable and in factdesired in order to eliminate relative accuracy artifacts, it may benecessary to take the raw results of a reverse conversion, and transformthe results to meet the original shaped line at strategic intervals. Inan embodiment of this technique, the steps to generate such a functionfrom a reverse transform (R), such that its standard deviation remainsless than a threshold (T) from an original chain (C), are described asfollows.

Find the furthest non-endpoint of chain C from both ends (that is, suchthat the smaller of distance (pt, C.front), distance (pt, C.back) isgreater than that for any other point).

If distance (C.front, C.back) is less than ½ the distance determined instep 1, bifurcate C at the point discovered in step 1, split R at aproportional point, and perform again for both halves.

Let R′ be an affine transform of R such that R.front equals C.front andR.back equals C.back. Check the standard deviation distance between Cand R. If greater than threshold T, bifurcate C at the point discoveredin step 1, split R at a proportional point, and perform again for eachhalf. Otherwise, R′ is the desired result.

Join the generated chains. They are all now within the distancetolerance (T).

In the ramp example shown in the previous illustrations, subtle relativeaccuracy jitter is removed. FIG. 17 shows one such location in the curvewhere this can be observed. 1700 illustrates this location of jitteralong an existing shaped centerline 1702. Shape line 1704 is the resultof conversion to clothoid and conversion back to shaped centerline. Itcan be seen that a smooth arc, particularly at location 1706, hasimproved the road's shaping.

In other cases, where the original line segment data is of loweraccuracy, as shown in FIG. 18, image 1800, a reshaping using thetechnique described produces the chain shown in image 1802. The newchain adheres remarkably well to the actual orientation of the feature.It would generate curvature information of high quality despite the poororiginal segment. In such a case either the original data may bereplaced by the reshaped line, or the data delivered for certain usesmight contain the replacement.

FIG. 18 shows such a case, in which a segment 1800 of the original datais replaced by 1802, the conversion to clothoid and conversion back toshaped centerline.

12. Generating Reasonable Approximations to Design Specifications

It is often useful to generate circular and clothoidal parameters forcurves as a reverse-engineering process to build a reasonableapproximation of original roadbed design. Such a process can be used toannotate “as built” drawings or to add further value to a geographicdatabase. When design drawings are available, the circular andclothoidal output generated from the process can be compared againstoriginal drawings, such that nearly identical values can be used toverify the database and drawings against each other. When significantlydifferent values are encountered, they may be used to identify as-builtdiscrepancies; locate issues in the underlying database, such as faultygeographic registration or data capture flaws; identify modelingdifferences that affect the road centerline, such as a road widening orlane configuration change; or identify transition zones that werepreviously unnoticed.

The application of such cross-checking is illustrated as follows. FIGS.19, 20, and 21 show a ramp and the design drawings for that ramp. InFIG. 19, annotations 1902 and 1903 on ramp 1900 indicate that the ramp'sradius has been identified as a constant 185.72 meters between thosepoints. Comparing with FIG. 20, which is one page of the designspecification for the same ramp, the surveyor specified a 185.000 meterradius of curvature (2000). Thus, the identified radius matches theramp's design specification of 185 meters with an error of|185.72-185.0|/185.0, or under 0.5%. This cross-check and the low erroryields a high degree of confidence that the ramp between these points isrepresented accurately.

Although the endpoints of the identified radius are generally correct,the southern endpoint is short, with a brief transition clothoid to anarc of about 20 meters wider, seen by the notation 1904 in FIG. 19. Thisshort shape transition is not reflected on the design document; however,review against photography (FIG. 22) shows that this is the precisespot, indicated at location 2200, in which an additional lane appears,widening the ramp. Furthermore, in this region of the ramp the vectorrepresentation hugs the outer edge of the curve instead of remainingcentral. The design document itself indicates a 90-meter taper zone forthis lane, correlating closely to the region identified between point1902 and 1904. The cross-check of the clothoid spline against designdocument thus has revealed an aspect of the road and of its databaserepresentation, which might be of interest either to the customer or toparties validating the lane modeling and positional accuracy of thedatabase.

At the northern end of the ramp is a transition zone between ramp andhighway. The context for this ramp was purposefully removed when runningthe invention, in order to show the means of identifying such an error.Notations 1906 indicate a radius that is not supported in the seconddesign drawing of FIG. 21. According to that design document, the curveshould gradually transition to a straight line, but instead notations1906 indicate a rather sudden turn. Thus, the cross-check with designdocumentation highlights the missing transition zone context, allowingthe error to be found and corrected.

13. Generating Data Files for ADAS and Other Uses

The means of this invention may be used to generate data files ordatabase tables that describe paths as clothoid splines. This may beuseful in the case where the original geometry is desired for display orother uses, but the curvature value is also needed.

One such method would be to populate a file or a database table withtext or binary rows of data representing at least each segment endpointand each transition point in the clothoid spline. Each row of data maycontain a segment identifier, a distance or proportion along thatsegment, and a curvature value expressed as either radius or diopter.Coordinates, the x and y position for each, might optionally be includedas well. One sample table is shown below, using the parameters shown inFIG. 13, for the ramp in FIG. 14. In this case, the geographic segmentidentifier is 72053

TABLE 1 ID Offset (m) Radius (m) 72053 0 0 72053 69 84 72053 129 6072053 288 60 72053 357 190 72053 422 190

The sample representation shown above uses radius instead of diopter forbetter human comprehensibility. However in this case the process mustencode straight lines which have an undefined radius with a specialvalue; in this case, zero. This sparse data allows any reading device tolinearly interpolate, using the two nearest enclosing captured values,in order to arrive precisely at the function's curvature for a givenpoint along the path. Thus to report the curvature for the point 100meters past the start of segment 72053, a device should calculate thatcurvature by linear interpolation as ((129−100)* 1/84+(100−69)*1/60)/(129−69), for a curvature of 0.0144 diopter or a radius of 69.6.

Another means of storing or transmittal for curvature might includeproviding arrays of (x, y, [z, . . . ], c) values in order to enhancethe typical two-to-three-or-higher dimensional coordinate data pointsdelivered with a geographic database—that is, inserting an extra valuerepresenting the instantaneous curvature at each shape point.

In addition to these methods, many other techniques can be used totransmit or convey the curvature data and should be considered withinthe scope of this invention.

Appendix 1—Listings A1.1: Generating a Linear (First Order) LeastSquares Curve Fit for Any Continuous Piecewise Linear Function

The C++ code listing of FIG. 23 shows a method to apply a least-squaresfit to a piecewise linear function or a portion thereof.

It is efficient to store piecewise linear functions in C++ standard map(std::map) objects, in which the x and y values of each point are storedwherever linear function pieces meet or terminate as the first andsecond fields of the map's value objects. Accessing a single section ofthe linear piecewise function consists of accessing two consecutive mapiterators.

A C++ object called LinearReference is used to represent all or aportion of a piecewise linear function. LinearReference provides abegin( ) and end( ) map iterator to indicate its bounded section of thefunction in question; it provides front( ) and back( ) to return theactual first and second (x,y) values at the extreme front and back ofthat section.

SlopeIntercept is a C++ object (not shown here) containing a slope andan intercept value. It can be constructed using standard algebra fromany two distinct coordinates (x1,y1) and (x2, y2) in which caseslope=(y2−y1)/(x2−x1), and the intercept=y1−slope*x1. This constructionis used on line 27. It can also be constructed directly from a slope andintercept specification as is used on the final return statement on line36.

In FIG. 23's listing, the least squares fit for a portion of a piecewiselinear function is begun by computing several easily calculatedparameters to the standard least-squares formula. The extreme x valuesare copied as local variables xbegin and xend in lines 10 and 11. Thesum of x values is calculated on line 12; the sum of x² is calculated online 14, and the sum of samples (for a continuous function, that is thedistance in x) is calculated on line 16. These are all easy integrals sothey need only be computed once. The working loop of the listing, inlines 18 through 32, takes linear section pieces in order and sums theremaining parameters, those that require the value of y. Map iteratorsitem and next demarcate the boundaries of each section of the linearpiecewise function. Average y is calculated on line 25. The integratedvalue of x*y is readily calculated once the slope intercept form of thefunction piece is known. The slope intercept form is built on line 27,and the integral on lines 29-31 is calculated. When the loop completes,it is a simple matter (lines 33-36) to apply the standard least squaresformula to the numeric values, resulting in a final slope-intercept formfor a best fit line.

Appendix 2—Steps to an Approximation of a Gaussian Smoothed LinearFunction as a Linear Function

In the curvature/distance domain, a function can be smoothed with anapproximation to a smoothing function in which smoothing functionsamples are connected by straight line functional segments, thusmaintaining an easy-to-use linear piecewise function. First, theindividual Gaussian weighting approximations can efficiently becalculated in a computing system. Only certain points, at specificdistances from each shape point in the original function, need be usedin defining a new smoothed piecewise linear function.

A2.1: Using a Gaussian Weighting Approximation

This Gaussian smoothed value may be calculated at any point along apiecewise linear function by summing the weighted integrals of eachfunctional section as it relates to that point. For mathematicalconvenience in the following description, the curvature/distancefunction is translated either forward or backward along the x axis, sothat the point being analyzed lies at the x origin.

Each linear piece of the function has an effect on the value at theorigin as indicated by the integral shown in FIG. 24 (Equation 7), theGaussian Weighted Value for a Linear Function at Zero, in which w is theinstantaneous Gaussian weight of a point at any given offset (x) fromthe origin; and the linear function's value (y) of such point can berepresented by v, the standard slope/intercept function form. The sigma(σ) value is the Gaussian smoothing sigma referred to in section 7.Substituting the slope/intercept form and integrating w*v yields theintegral function 2400.

This function is not integratible, but it can be approximated bysampling the w*v value at small increments of x over the course of thatpiece's length, where w is the instantaneous Gaussian weight at aparticular location relative to the sample point, and v is the linearfunction's value. Call these increments of x the quantization interval,or q. One embodiment further simplifies these Gaussian calculations byconsidering all piecewise function events (beginning, end) to occur atintervals q—that is, each event location is forced to the closestinteger multiple of q from the origin. q is usually related to σ; forexample, q might be 0.01σ. Further, one embodiment saves and reusesweighting calculation results by using the following observations:

Consider a standard normal Gaussian weighting function centered on theorigin, in which σ=1. Call the distance axis G (to distinguish it fromthe X axis of our prior functions). Given any linear function v(G),which occurs over the interval (g_(begin), g_(end)), such thatv(g_(begin))=v_(begin) and v(g_(end))=v_(end). Note that the overallweighted average value v for that range bears a constant relationshipwith v_(begin), v_(end) such that:

v=(1−c)v _(begin) +cv _(end)   Equation 8

for some value c between zero and one. The overall Gaussian weight ofthis section is also a constant, w.

Combining this concept with the quantization mentioned previously, notethat one can associate a pair of c and w for any quantized Gaussianinterval (g_(begin), g_(end)). These values can either be computed apriori and stored in a lookup table, or computed only once the firsttime a unique interval (g_(begin), g_(end)) is used. These stored valuescan be used to easily calculate the overall effect of each functionsection upon the Gaussian value of a given point.

The calculations are further simplified by limiting the range ofconsideration to a reasonable distance such as ±4σ, since data beyondthis point contributes negligibly (roughly 0.006%).

The simplification concepts described herein yield a method and equationshown in FIG. 25 (Equation 9). A range of the linear piecewise functionwill be analyzed around a point in the X axis called p_(x). A sectionfunction is constructed, which returns the section containing a givenpoint. Using that section function, consider each section within therange of p_(x)−nσ, to p_(x)+nσ, where nσ represents our reasonablerange, such as the 4σ range previously suggested. A normalized distancequantization function, q, is also constructed, which remembers currentpoint p_(x) and sigma σ; for any x position it returns a quantization ofthe standard normal distance from p_(x). For example, if σ=4, thequantization unit is 0.01σ, p_(x) is 200, and x is 205.367, thenx−p_(x)=5.367, dividing by σ yields 1.34175; and the quantization to thenearest 0.01σ yields 1.34. A function c is further defined to calculatethe value multiplier in FIG. 25 for any quantized a range, and afunction w to calculate the Gaussian weight value for any quantized σrange. Using the observations that c′ and w′ are constant for any uniquequantization range (q(s_(begin)), q(s_(end))), the c and w functions maybe designed to read the values of c′ and w′ from a lookup table based onrange; and to store a calculated value the first time that range isencountered. With that suite of functions, one can efficiently evaluateEquation 9 by summing the values for each function piece within therange of sections of interest.

A2.2: Approximating the Gaussian Smoothed Function with Straight LineComponents

One embodiment retains data simplicity by using piecewise linearapproximations to the Gaussian smoothing function. This embodiment ismost efficient if the number of points at which Equation 9 is calculatedis strictly limited. The Gaussian smoothing function's value can beapproximated by evaluating only a few strategic locations near thecritical shape points. It is shown in the Gaussian curve in FIG. 26 thatthe weighting function can be approximated with under 2% RMS error bysimply evaluating Equation 9 at each critical shape point, plus thepoints at ±2.197σ offset, and at ±4σ offset from each such point. FIG.26 illustrates the Gaussian weight curve, 2600, compared against alinear approximation 2602 in which samples are taken at 2.197σ and 4.0σ. Calculating the sample point and the points at ±2.197σ offset, and at±4σ offset from the sample requires one to generate no more than fiveapproximations per original sample point.

This technique works well because the a value is low relative to theoriginal data's relative accuracy. That is, the <2% error one may incurin representing the Gaussian smoothing function, in which the σ value ismerely three times the relative accuracy, is a value of less than 0.06times the relative accuracy. Thus, the incurred Gaussian representationerror is far below the random noise caused by the shapes themselves.

For simplicity, when two sample points are less than double the 2.197σapart, a single midpoint sample can be inserted between them; similarly,for samples less than 8σ apart, in addition to the ±2.197σ sample pointinsertions, insert a single midpoint sample to limit the effects of anydata fluctuations outside the samples on the line between them.

Embodiments can include computer-based methods and systems which may beimplemented using a conventional general purpose computer(s) or aspecialized digital computer(s) or microprocessor(s), programmedaccording to the teachings of the present disclosure. Appropriatesoftware coding can readily be prepared by programmers based on theteachings of the present disclosure.

Embodiments can include a computer readable medium, such as a computerreadable storage medium. The computer readable storage medium can havestored instructions which can be used to program a computer to performany of the features present herein. The storage medium can include, butis not limited to, any type of disk including floppy disks, opticaldiscs, DVD, CD-ROMs, micro drive, and magneto-optical disks, ROMs, RAMs,EPROMs, EEPROMs, DRAMs, flash memory or any media or device suitable forstoring instructions and/or data. The present invention can includesoftware for controlling the hardware of a computer, such as a generalpurpose/specialized computer(s) or a microprocessor(s), and for enablingthem to interact with a human user or other mechanism utilizing theresults of the present invention. Such software may include, but is notlimited to, device drivers, operating systems, executionenvironments/containers, and user applications.

Embodiments can include providing code for implementing processes. Theproviding can include providing code to a user in any manner. Forexample, the providing can include providing the code on a physicalmedia to a user; or any other method of making the code available.

Embodiments can include a computer-implemented method for transmittingthe code which can be executed at a computer to perform any of theprocesses of embodiments. The transmitting can include transfer throughany portion of a network, such as the Internet; through wires; or anyother type of transmission. The transmitting can include initiating atransmission of code; or causing the code to pass into any region orcountry from another region or country. A transmission to a user caninclude any transmission received by the user in any region or country,regardless of the location from which the transmission is sent.

The foregoing description of preferred embodiments has been provided forthe purposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Many modifications and variations will be apparent to one of ordinaryskill in the relevant arts. For example, steps performed in theembodiments of the invention disclosed can be performed in alternateorders, certain steps can be omitted, and additional steps can be added.The embodiments were chosen and described in order to best explain theprinciples of the invention and its practical application, therebyenabling others skilled in the art to understand the invention forvarious embodiments and with various modifications that are suited tothe particular use contemplated. It is intended that the scope of theinvention be defined by the claims and their equivalents.

1. A system, comprising: a geographic data information system, whereinthe geographic data information system stores database segments in adatabase, wherein the database segments describe roadways; and a systemfor applying clothoid curve values to roadways, wherein the system forapplying clothoid curve values to roadways: determines segment chainsfrom the selected database segments; prepares the segment chains fortransition to curvature space; transitions to a curvature function inthe curvature space, by computing heading change at points along thesegment chains, resulting in a transformation of the segment chains intoclothoids; smooths the curvature function; fits the smoothed curvaturefunction with a more generalized form which remains within a selectedtolerance of the smoothed curvature function; and stores identifiedsegments of straight lines, transition zones, and segments of constantcurvature in the geographic data information system.
 2. The system ofclaim 1, wherein the system for applying clothoid curve values toroadways determines the segment chains, comprising: identifying aplurality of at grade junctions of the selected segments and all deadends of the selected segments as important locations; and finding eachgeographic chain of segments that traverse from any important location,and touch no other important location, until reaching the same or otherimportant location.
 3. The system of claim 1, wherein the system forapplying clothoid curve values to roadways prepares the segment chainsfor transition to curvature space, comprising: finding cornerinterfaces.
 4. The system of claim 3, wherein finding corner interfacesincorporates shape generalization to remove nearly collinear shapepoints.
 5. The system of claim 3, wherein finding corner interfacescomprises: using relative accuracy information to approximate a lineattached to a curve defined by three successive shape points.
 6. Thesystem of claim 3, wherein the system for applying clothoid curve valuesto roadways prepares the segment chains for transition to curvaturespace, comprising: generalization of shape points that have not beenidentified as part of a corner interface.
 7. The system of claim 1,wherein the system for applying clothoid curve values to roadwaysprepares the segment chains for transition to curvature space,comprising: determination of each segment chain's geographic context. 8.The system of claim 1, wherein the system for applying clothoid curvevalues to roadways smoothes the curvature function, comprising Gaussiansmoothing.
 9. The system of claim 1, wherein the system for applyingclothoid curve values to roadways smoothes the curvature functioncomprises: an approximation to Gaussian smoothing with a piecewiselinear function connecting Gaussian sample points placed at intervalsfrom shape points.
 10. The system of claim 9, wherein the approximationto Gaussian smoothing is obtained from iterative samples stored in atable that associates Gaussian intervals with numeric parameters. 11.The system of claim 1, wherein the system for applying clothoid curvevalues to roadways fits the smoothed curvature function by seamingtogether a plurality of weighted least squares regression fit functionsinto a piecewise linear function.
 12. The system of claim 11, whereinthe system for applying clothoid curve values to roadways fits thesmoothed curvature function, further comprising: applying a search foracceptable straight line substitutions to the piecewise linear fitfunction.
 13. The system of claim 12, wherein the search for acceptablestraight line substitutions to the piecewise linear fit function furthercomprises: generating a straight line function value that generates nochange in overall function area
 14. The system of claim 12, wherein thesystem for applying clothoid curve values to roadways fits the smoothedcurvature function, further comprising: applying a search for straightlines and singular points in the piecewise linear fit function which canbe acceptably replaced with a value of zero.
 15. The system of claim 1,wherein the database segments comprise roadways in x,y positions. 16.The system of claim 15, wherein the database segments further comprisenon-roadway features.
 17. The system of claim 1, wherein the databasesegments comprise roadways in x,y,z positions.
 18. The system of claim1, wherein the system for applying clothoid curve values to roadwaysfurther comprises: resulting in parameters of curvature gradients asclothoids mapped to transition zones.
 19. The system of claim 1, whereinthe system for applying clothoid curve values to roadways furthercomprises: resulting in parameters of curvature mapped into segments ofconstant curvature.
 20. The system of claim 1, wherein the system forapplying clothoid curve values to roadways further comprises: whereinparameters of curvature are used to compute safe speed parameters. 21.The system of claim 1, wherein the system for applying clothoid curvevalues to roadways further comprises: wherein parameters of curvatureare compared with an ideal maneuver.
 22. The system of claim 1, whereinthe system for applying clothoid curve values to roadways furthercomprises: scoring a driver's performance relative to an optimum drivingtechnique.
 23. The system of claim 1, wherein the system for applyingclothoid curve values to roadways further comprises: approximatingroadbed shaping design from shaped geographic line segments.
 24. Thesystem of claim 23, wherein the roadbed design is composed of straightlines, circular arcs, and clothoidal sections.
 25. The system of claim23, wherein the process for roadbed design approximation consists ofdetermining straight line edge interfaces at the beginning of curvesections.
 26. The system of claim 1, wherein the system for applyingclothoid curve values to roadways further comprises: determining roadbeddesign parameters from x, y positions and roadbed design principles.